import { DataTypes, InferAttributes, InferCreationAttributes, Model, Sequelize } from 'sequelize'

export class SysWsUrl extends Model<InferAttributes<SysWsUrl>, InferCreationAttributes<SysWsUrl>> {
  // id?: number
  // host?: string
  // port?: string

  static initModel(sequelize: Sequelize): typeof SysWsUrl {
    return SysWsUrl.init(
      {
        id: {
          autoIncrement: true,
          type: DataTypes.INTEGER,
          allowNull: false,
          primaryKey: true,
          field: 'id'
        },
        host: {
          type: DataTypes.TEXT,
          allowNull: true,
          field: 'host'
        },
        port: {
          type: DataTypes.TEXT,
          allowNull: true,
          field: 'port'
        }
      },
      {
        sequelize,
        tableName: 'sys_ws_url',
        timestamps: false
      }
    )
  }
}
